<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<?php 
    global  $wpdb;
    $table = $wpdb->prefix.'email';
    $sql ="SELECT * FROM $table order by email DESC";
    $result = $wpdb->get_results($sql);
?>
<h2>Email Customer</h2>
<p>List Email Booking</p>
<div class="wrap">
    <table class="wp-list-table widefat fixed posts">
        <thead>
            <tr>                
                <th class="column-title"><?php _e('Email'); ?></th>                
                <th class="column-title"><?php _e('Date'); ?></th>                
            </tr>
        </thead>
        
        <tbody>            
            <?php 
            foreach ($result as $re):
            ?>            
            <tr>                
                <td>
                    <?php echo $re->email; ?>
                </td> 
                <td>
                    <?php echo date('d-m-Y',strtotime($re->Date)); ?>
                </td> 
                
            </tr>
            <?php endforeach;?>
        </tbody>

    </table>
</div>